function coveredPawns(pawns) {
    var x = 'abcdefgh';
    var diff = [[-1, -1], [1, -1]];
    cnt = 0;
    for (p of pawns) {
        if (diff.some(v => pawns.includes(x[x.indexOf(p[0]) + v[0]] + (+p[1] + v[1])))) cnt++;
    }
    return cnt;
}